package com.huawei.hms.update.ui;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;
import com.huawei.hms.utils.ResourceLoaderUtil;

public class i extends b {
    private String a = ResourceLoaderUtil.getString("hms_update_title");

    protected AlertDialog a() {
        int stringId = ResourceLoaderUtil.getStringId("hms_update_message_new");
        int stringId2 = ResourceLoaderUtil.getStringId("hms_install");
        Builder builder = new Builder(f(), g());
        builder.setMessage(f().getString(stringId, new Object[]{this.a}));
        builder.setPositiveButton(stringId2, new OnClickListener(this) {
            final /* synthetic */ i a;

            {
                this.a = r1;
            }

            public void onClick(DialogInterface dialogInterface, int i) {
                this.a.e();
            }
        });
        builder.setNegativeButton(ResourceLoaderUtil.getStringId("hms_cancel"), new OnClickListener(this) {
            final /* synthetic */ i a;

            {
                this.a = r1;
            }

            public void onClick(DialogInterface dialogInterface, int i) {
                this.a.b();
            }
        });
        return builder.create();
    }

    public void a(String str) {
        this.a = str;
    }
}
